bably too large,
> but I think that a little more space than you currently have would be
> better.
I haven’t adjusted the space directly. I just changed the \times and \cdot from
class binom to class ord. I’m not going to tweak the space. I don’t even use
this font. With proportional numbers i
On 7/9/2022 12:40 AM, Otared Kavian via ntg-context wrote:
I just found that \choose has been replaced with \binom (binomial coefficient):
\starttext
\meaning\choose
\meaning\binom
$\binom{n}{k}$
\stoptext
Sorry for complaining… :-)
no problem ... maybe we should have a wiki page for 'use
I just found that \choose has been replaced with \binom (binomial coefficient):
\starttext
\meaning\choose
\meaning\binom
$\binom{n}{k}$
\stoptext
Sorry for complaining… :-)
> On 9 Jul 2022, at 00:34, Otared Kavian wrote:
>
>
>
>> On 6 Jul 2022, at 22:10, Hans Hag
On 3/16/2021 3:11 PM, Jacob Kauffmann wrote:
Dear list,
lmtx draws a fraction line in \binom{n}{k},
ConTeXt ver: 2021.02.23 17:47 LMTX fmt: 2021.2.26 int: english/english
The same happens with {n \choose k}.
The other version I tested draws it correctly (without the bar
Dear list,
lmtx draws a fraction line in \binom{n}{k},
ConTeXt ver: 2021.02.23 17:47 LMTX fmt: 2021.2.26 int: english/english
The same happens with {n \choose k}.
The other version I tested draws it correctly (without the bar):
ConTeXt ver: 2019.03.21 21:39 MKII fmt: 2019.11.14
\binom{n-1}{k-1}}
\stopxcell
\startxcell[width=fit]
\m{+}
\stopxcell
\startxcell
\m{\displaystyle\binom{n-1}{k}}
\stopxcell
\stopxrow
\startxrow
\startxcell
\stopxcell
}]}]
\starttabulate [|p|r|]
\NC\NC #2 \NC\NR
\NC #1 \NC\NC\NR
\stoptabulate
}
\starttext
\startluacode
function Binom(n,k)
if k > n then
return ""
elseif (n == 0 or k == 0) then
return 1
else
return
.
Best regards,
Dalyoung
> 2020. 7. 20. 오후 5:36, Hans Hagen 작성:
>
> On 7/20/2020 7:56 AM, Jeong Dal wrote:
>> Dear Fabrice,
>> You may split Binom(n,k) function into two functions as following:
> > see original mail
> >
>> Dalyoung
> Best stay in a
Dal wrote:
> > Dear Fabrice,
> >
> > You may split Binom(n,k) function into two functions as following:
> >
> > see original mail
> >
> > Dalyoung
> Best stay in a protected namespace ...
>
> \startluacode
>
> local function fact (n)
>
Dear Fabrice,
You may split Binom(n,k) function into two functions as following:
*
\startluacode
P={}
combi = P
function P.fact (n)
if n <= 0 then
return 1
else
return n * P.fact(n-1)
end
end
function P.ncr(n,r)
return P.fact(n)/(P.fact(r)*P.fact(n-r))
end
co
On 7/20/2020 7:56 AM, Jeong Dal wrote:
Dear Fabrice,
You may split Binom(n,k) function into two functions as following:
> see original mail
>
Dalyoung
Best stay in a protected namespace ...
\startluacode
local function fact (n)
if n <= 0 then
return 1
to use context(...) here?
>> How not to display the .0 ?
Or even better, you can return an integer in your Binom function:
return math.round((n*Binom(n-1,k-1))/k)
Best regards: Otared
___
If your qu
ggested, ou can also use
context(math.round(Binom(i,j)))
to have integers instead of real numbers.
Best regards: Otared
___
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : n
Fabrice Couvreur schrieb am 18.07.2020 um 22:25:
Hi Wolfgang,
It works but why did you ask this question since I finally use context ?
Are you sure you want to use context(...) here?
In your first version you used the context function in the loop to print
the output of the Binom
Small correction :
\starttext
\startluacode
function Binom(n,k)
if k > n then
return 0
elseif (n == 0 or k == 0) then
return 1
else
return (n*Binom(n-1,k-1))/k
end
end
context.startxtable({"align={mid
abrice Couvreur schrieb am 18.07.2020 um 22:09:
> > Hi,
> > I improved the code to be able to display the grid but I cannot display
> > the coefficients.
> > Thank you
> > Fabrice
> >
> > \starttext
> >
> > \startluacode
> >
Fabrice Couvreur schrieb am 18.07.2020 um 22:09:
Hi,
I improved the code to be able to display the grid but I cannot display
the coefficients.
Thank you
Fabrice
\starttext
\startluacode
function Binom(n,k)
if k > n then
return 0
elseif (n == 0 or k =
Hi,
I improved the code to be able to display the grid but I cannot display the
coefficients.
Thank you
Fabrice
\starttext
\startluacode
function Binom(n,k)
if k > n then
return 0
elseif (n == 0 or k == 0) then
return 1
else
ret
Fabrice Couvreur schrieb am 18.07.2020 um 20:05:
Hello,
I want to display the values of Pascal's triangle in a table.
Unfortunately my knowledge of Lua is not sufficient to run this code.
Thank you.
Fabrice
\starttext
\startluacode
function Binom(n,k)
if k >
Hello,
I want to display the values of Pascal's triangle in a table.
Unfortunately my knowledge of Lua is not sufficient to run this code.
Thank you.
Fabrice
\starttext
\startluacode
function Binom(n,k)
if k > n then
return 0
elseif (n == 0 or k =
>> Hi,
>>
>> I stumbled upon this (see the attached file for the result):
>>
>> %%% Test file
>> \setupbodyfont[10pt]
>> \starttext
>> \startTEXpage[offset=10pt]
>> \type{\tbinom{n}{k}}: $\tbinom
xt
\startTEXpage[offset=10pt]
\type{\tbinom{n}{k}}: $\tbinom{n}{k}$, (does not look good, the
vertical space between $n$ and $k$ is too big) \par
\type{\binom{n}{k}}: $\binom{n}{k}$ (looks fine to me)\par
\type{\dbinom{n}{k}}: $\dbinom{n}{k}$ (does not lo
arttext
>> \startTEXpage[offset=10pt]
>> \type{\tbinom{n}{k}}: $\tbinom{n}{k}$, (does not look good, the vertical
>> space between $n$ and $k$ is too big) \par
>> \type{\binom{n}{k}}: $\binom{n}{k}$ (looks fine to me)\par
>> \type{\dbinom{n}{k}}: $\dbinom{n
big) \par
\type{\binom{n}{k}}: $\binom{n}{k}$ (looks fine to me)\par
\type{\dbinom{n}{k}}: $\dbinom{n}{k}$ (does not look good, too big
parenthesis, even for displayed formulas).\par
\stopTEXpage
\stoptext
%%% End of test file
I think something should be changed to get the binomial coefficients
Hi,
I stumbled upon this (see the attached file for the result):
%%% Test file
\setupbodyfont[10pt]
\starttext
\startTEXpage[offset=10pt]
\type{\tbinom{n}{k}}: $\tbinom{n}{k}$, (does not look good, the vertical
space between $n$ and $k$ is too big) \par
\type{\binom{n}{k}}: $\binom{n}{k}$ (looks
can use \binom which is the recommended way in context.
The \dbinom command sets the content in display style while \tbinom use
textstyle.
\starttext
Using \tex{binom} in text $\binom{n}{\frac{n}{2}}$.
Using \tex{dbinom} in text $\dbinom{n}{\frac{n}{2}}$.
Using \tex{tbinom} in text $\tbinom{n
limitation and therefore expected?
Instead if \choose you can use \binom which is the recommended way in context.
The \dbinom command sets the content in display style while \tbinom use
textstyle.
\starttext
Using \tex{binom} in text $\binom{n}{\frac{n}{2}}$.
Using \tex{dbinom
Hi,
here is another problem regarding \environments.
% \setupbodyfont[palatino] % OK
\starttext
\setupbodyfont[palatino] % not OK
\startformula
\binom{n}{0}
\stopformula
\stoptext
To avoid it, I'd have to use something like the following?
\environment font-setups
\startproduct
Am 16.07.2011 um 15:00 schrieb Andreas Harder:
Hi,
here is another problem regarding \environments.
% \setupbodyfont[palatino] % OK
\starttext
\setupbodyfont[palatino] % not OK
\startformula
\binom{n}{0}
\stopformula
\stoptext
To avoid it, I'd have to use something like
Math?
No but you can use my calluna typescripts:
\usetypescriptfile[type-calluna]
\definetypeface[mainface][rm][serif][calluna][default]
\definetypeface[mainface][mm][math] [modern] [computer-modern]
\setupbodyfont[mainface]
\starttext
Calluna and Latin Modern Math
\startformula
\binom{1}{2
the math font doesn't help
either.
\usemodule[simplefonts]
\setmainfont[Calluna]% could be Latin Modern Roman
%\setmathfont[Latin Modern Math]% as in t-simplefonts.tex
\starttext
\startformula
\binom{1}{2}
\stopformula
\stoptext
Regards.
-- Cédric
simplefonts-error.tex
Description: TeX
fonts which
are used when you use the simplefonts module:
\definetypeface[mainface][rm][serif][modern]
\definetypeface[mainface][mm][math] [modern]
\setupbodyfont[mainface]
\starttext
\startformula
\binom{1}{2}
\stopformula
\stoptext
Wolfgang
][mm][math] [modern]
\setupbodyfont[mainface]
\starttext
\startformula
\binom{1}{2}
\stopformula
\stoptext
Wolfgang
___
If your question is of interest to others as well, please add an entry
the fault of the OpenType version of the LM Math fonts which
are used when you use the simplefonts module:
\definetypeface[mainface][rm][serif][modern]
\definetypeface[mainface][mm][math] [modern]
\setupbodyfont[mainface]
\starttext
\startformula
\binom{1}{2}
\stopformula
\stoptext
If I don't
[mainface]
\starttext
\startformula
\binom{1}{2}
\stopformula
\stoptext
After perusing the log file, here are the font files that are loaded:
/DATA/context-minimals/tex/texmf/fonts/opentype/public/lm/lmmath.otf
/DATA/context-minimals/tex/texmf/fonts/opentype/public/lm/lmroman10
or LuaTeX because it does only appear with OpenType math fonts:
Input:
\usemodule[simplefonts]
\setmainfont[Calluna]
\startbuffer[example]
\input ward\par
\startformula
c^2=a^2+b^2 \quad \binom{1}{2}
\stopformula
\stopbuffer
\starttext
\getbuffer[example]
\setmathfont[palatino]\getbuffer
[example]
\input ward\par
\startformula
c^2=a^2+b^2 \quad \binom{1}{2}
\stopformula
\stopbuffer
\starttext
\getbuffer[example]
\setmathfont[palatino]\getbuffer[example]
\setmathfont[euler]\getbuffer[example]
\setmathfont[times]\getbuffer[example]
\setmathfont[cambria]\getbuffer[example
Hi Hans,
with the latest beta asana-math.lfg don't seem to have any influence of the
output.
\setupbodyfont[asana]
\startTEXpage[offset=1ex]
$\binom{n}{k}\quad \dbinom{n}{k}$
\stopTEXpage
It used to work with the experimental two or three days ago.
Greeting
Andreas
and relax these primitives
I'm fine with \binom{x}{y} etc.
aditya: shouldn't we merge the m-newmath code into the core?
+1
I can add some configurability to lfg files so that one can tune fonts but
even then the value are debatable
I don't know the best value either, but et least one could
stoptext
In fact, it seems atopwithdelims() isn't working because the problem can be
fixed by adding
delimiterfactor=1001
defbinom#1#2{left(#1 atop #2right)}
starttext
startformula
binom{a}{b}
stopformula
stoptext
The second problem is much more bothering to me because I can't typeset limits
I've been trying to make some notes on typesetting math in ConTeXt,
and using nath seems the way to go. An odd thing about using \binom
with nath: in displayed equations, it works fine, in inline
equations, \binom{1}{2} will typeset 1(2) (with a raised 2).
I suppose it's known that \startalign
\next\relax
[EMAIL PROTECTED]
\def\atop{%
[EMAIL PROTECTED] command \string\atop }
{No more a valid command. Use array instead.}%
\let\next\relax
[EMAIL PROTECTED]
\def\choose{%
[EMAIL PROTECTED] command \string\choose }
{No more a valid command. Replace {A \choose B} with \binom
.}}
[EMAIL PROTECTED] command \string\atop }
{No more a valid command. Use array instead.}}
[EMAIL PROTECTED] command \string\choose }
{No more a valid command. Replace {A \choose B} with \binom A B.}}
also messes up stuff in core-ref.tex for example:
AHA! Good point. Try this fix:
[EMAIL
} with \frac A
[EMAIL PROTECTED]
[EMAIL PROTECTED] command \string\atop }
{No more a valid command. Use array [EMAIL PROTECTED]
[EMAIL PROTECTED] command \string\choose }
{No more a valid command. Replace {A \choose B} with \binom A
[EMAIL PROTECTED]
Ah, of course...
nikolai
--
::: name
}
{No more a valid command. Replace {A \over B} with \frac A
[EMAIL PROTECTED]
[EMAIL PROTECTED] command \string\atop }
{No more a valid command. Use array [EMAIL PROTECTED]
[EMAIL PROTECTED] command \string\choose }
{No more a valid command. Replace {A \choose B} with \binom
I'm having all kinds of issues with
nath (even without any preamble at all), like \binom{\frac 12}{a} not
working, \to, \ot and \otto arrows not adjusting to the lengths of
their subscripts, etc... and I can hardly imagine that all of these are
nath bugs, so maybe something's wrong with my TeX
46 matches
Mail list logo